<? 
include("protect1.php"); 
//$mkjur='mk'.$reg_jurusan;
$mkjur='mk';
?>
<STYLE type=text/css>.blank {
	FONT-SIZE: 0px; WIDTH: 0px; HEIGHT: 0px
}
TD {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
INPUT {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.present {
	FONT-WEIGHT: bold; BACKGROUND-COLOR: #dee5ec
}
.h1 {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffffff
}
.d1 {
	COLOR: #c0c0c0
}
.link {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.footer {
	FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.footer1 {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; BACKGROUND-IMAGE: url(chat/images/menu_b.gif); CURSOR: default; COLOR: #000000; BORDER-BOTTOM: 0px
}
.header {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; BACKGROUND-IMAGE: url(chat/images/menu_h.gif); CURSOR: default; COLOR: #000000; BORDER-BOTTOM: 0px
}
.textcol {
	FONT-SIZE: 12px; COLOR: #2378d5; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</STYLE>


<style type="text/css">
<!--
body,td,th {
	color: #FFFFFF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11pt;
}
body {
	background-color: #001E8C;
	background-image: url(bg.jpg);
	background-repeat: repeat;
}
a:link {
	color: #FFFFFF;
	text-decoration: none;
}
a:visited {
	color: #CCCCCC;
	text-decoration: none;
}
a:hover {
	color: #001E8B;
	text-decoration: underline;
}
a:active {
	color: #001F8A;
	text-decoration: none;
}
-->
</style>
<title>:: HOME ::</title><table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="7e96dc">&nbsp;</td>
  </tr>
  <tr>
    <td><img src="images/bannerAtas.jpg" alt="image" width="780" height="200" /></td>
  </tr>
  <tr>
    <td bgcolor="3a5db1">
	<!--- sek sebentar
		 
	-->
	<?php
	$recno=$_GET["recno"];
    $kodemkx=$_GET["kodemk"];
	$sesix=$_GET["sesi"];
	$periodex=$_GET["periode"];
	$semester=$_GET["semester"];
	//include("banner.html");
	include("connect.php");
	$pilih=mysql_select_db("uwika_krs",$conn);
	$sqlstr="select dosen,pagu,keterangan,$mkjur.nama,$mkjur.sks,penawaran.hari, penawaran.mulaipukul,penawaran.selesaipukul from penawaran,$mkjur where penawaran.recno='$recno' and penawaran.kodemk='$kodemkx' and sesi='$sesix' and periode='$periodex' and penawaran.kodemk=$mkjur.kodemk";
	$hasil=mysql_query($sqlstr);
	$row = mysql_fetch_row($hasil);
	list($dosen,$pagu,$keterangan,$namamk,$sksx,$hari,$mulaipukul,$selesaipukul) = $row;
	echo "<BR>";
	echo "<table width=\"88%\" border=\"0\">";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td width=\"15%\">" . "Kode Mata Kuliah" . "</td>" . "<td width=\"1%\">" . ":" . "</td>" . "<td>" . $kodemkx . "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Nama Mata Kuliah" . "</td>" . "<td>" . ":" . "</td>" . "<td>" . $namamk . "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Jumlah SKS" . "</td>" . "<td>" . ":" . "</td>" . "<td>" . $sksx . "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Keterangan" . "</td>" . "<td>" . ":" . "</td>" . "<td>" . $keterangan . "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Semester" . "</td>" . "<td>" . ":" . "</td>" . "<td>" . $semester . "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Periode" . "</td>" . "<td>" . ":" . "</td>" . "<td>" . $sesix . " / " . $periodex . "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Dosen Pengajar" . "</td>" . "<td>" . ":" . "</td>" . "<td>" . $dosen . "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Kuota Kelas" . "</td>" . "<td>" . ":" . "</td>" . "<td>";
	if ($pagu == 0) {
		echo "Jumlah mahasiswa tidak dibatasi.";
	} else {
		echo "Maksimal $pagu mahasiswa";
	}
	echo "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Hari" . "</td>" . "<td>" . ":" . "</td><td>"  . $hari . "</td></tr>";
	echo "<tr><td width=\"5%\"></td>";
	echo "<td>" . "Pukul" . "</td>" . "<td>" . ":" . "</td><td>"  . $mulaipukul . " - " . $selesaipukul . " WIB" . "</td></tr>";
	echo "</table>";
	echo "<br>";
        echo "<table width=\"88%\" border=0>";
	echo "<tr><td width=5%></td><td>";
	echo "<table align=center width=\"100%\" border=\"1\">";
	echo "<tr>";
	echo "<td width=\"7%\"><center>N R P</center></td>";
	echo "<td width=\"30%\"><center>N A M A &nbsp; M A H A S I S W A</center></td>";
	echo "<td width=\"7%\"><center>STATUS</td>";
	echo "<td width=\"15%\"><center>TGL & JAM DAFTAR</td>";
	echo "</tr>";

	$sqlstr="select registrasi.nrp, registrasi.status, biodata.nama, date_format(registrasi.tanggal,'%d-%m-%Y'), registrasi.jam from registrasi,biodata where kodemk='$kodemkx' and sesi='$sesix' and periode='$periodex' and registrasi.nrp=biodata.nrp order by registrasi.tanggal";
	$hasil=mysql_query($sqlstr);
	$row = mysql_fetch_row($hasil);
	$counter=0;
	do {
		list($nrp,$status,$namamhs, $tanggal, $jam) = $row;
		if (empty($nrp)) {
		echo "";
		break;
		} 
		echo "<tr><td><center> $nrp </center></td>";
		echo "<td> $namamhs </td>";
		echo "<td><center> $status </td>";
		echo "<td><center> $tanggal $jam </center></td>";
		echo "</tr>";
		$counter=$counter + 1;
	} while ($row=mysql_fetch_row($hasil));
	echo "</table></td><td width=5%></td></table>";
	echo "<br>";
	
	echo "<table width=\"78%\" border=\"0\">";
	echo "<tr>";
	echo "<td width=\"35%\">Jumlah mahasiswa yang terdaftar saat ini" . "</td>" . "<td width=\"1%\">" . ":" . "</td>" . "<td><b>" . $counter . "</b> mahasiswa" . "</td></tr>";
	echo "</table>";
	echo "<br>";
	echo "<table width=\"88%\" border=\"0\">";
	echo "<tr><td width=\"5%\"></td><td colspan=6>Daftarkan mata kuliah ini ke dalam KRS saya pada</td></tr>";
	echo "<form name=\"frmdaftar\" method=\"POST\" action=\"add.php\">";
	echo "<tr><td width=\"7%\"></td><td width=\"19%\">Semester : GASAL</td>";	// semesterannya diganti
	echo "<input name=\"sel_sesi\" value=\"GASAL\" type=\"hidden\">";		// semesterannya diganti
	echo "<td width=\"21%\">Periode : 2012-2013</td>";				// tahun ajaran ato periode
	echo "<input type=hidden name=sel_periode value=\"2012-2013\">";		// tahun ajaran ato periode
	echo "<input type=hidden name=kodemk value=" . $kodemkx . ">";
	echo "<input type=hidden name=sksx value=" . $sksx . ">";
	echo "<input type=hidden name=jmlmhs value=" . $counter . ">";
	echo "<input type=hidden name=dftr_hari value=" . $hari . ">";
	echo "<input type=hidden name=dftr_mulaipukul value=" . $mulaipukul . ">";
	echo "<input type=hidden name=dftr_selesaipukul value=" . $selesaipukul . ">";
	echo "<input type=hidden name=recno value=" . $recno . ">";
	echo "<td width=\"5%\"> " . "<input name=\"Submit\" type=\"submit\" value=\"Daftar\">" . "</td>";
	echo "</form>";
	echo "<form name=\"frmbatal\" method=\"post\" action=\"studentpage.php\">";
	echo "<td>" . "<input type=\"button\" value=\"Kembali\" onClick=\"javascript: history.go(-1)\">" . "</td></tr>";
	echo "</form>";
	echo "</table>";
	echo "<br>";
	include("footer.php");
?>
	&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="7e96dc"><div align="center">copyleft ICT 2012 </div></td>
  </tr>
</table>

